package org.xiaojinlong.exam;

import java.util.Scanner;

/**
 * @author Jin Long
 *         2015/10/9
 */
public class Rabbit {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int M = scanner.nextInt();
        int a = 0, b = 1;
        for (int i = 1; i < M; i++) {
            b = a + b;
            a = b - a;
        }
        System.out.println(b);
//        int sum = 1;
//        for (int i = 0; i < 1e5; i++)
//            sum = sum + 2;
//        System.out1.println(sum);
//        int i;
//        i = (i = 2) + 1;
//        System.out1.println(i);
    }
}
